<!--#include("_header.html")-->

<div class="replyForm">
	<form method="post" onsubmit="return insertGuestbookItem(this, insert_guestbookitem)" action="">
		<input name="mid" type="hidden" value="{$mid}" />
		<div class='guestbook_form'>
			<label for="edit-message">Message: <span title="This field is required." class="form-required">*</span></label>
			<fieldset>
				<textarea class="inputTextarea" name="content" rows="5" cols="50"></textarea>
		    </fieldset>
			<!--@if($is_logged)-->
				<span class="member_{$logged_info->member_srl}"><strong class="name">{$logged_info->nick_name}</strong></span> <span class="email">{$logged_info->email_address}</span> <span class="url">{$logged_info->homepage}</span>
				<div class="input_submit">
					<input name="submit" type="submit" value="Submit" class="inputSubmit" />
				</div>
			<!--@else-->
				<input name="nick_name" type="text" class="inputText name" value="Name" title="Name"/>
				<input name="password" type="password" class="inputText pw" value="Password" title="Password" />
				<script type="text/javascript">
					jQuery(function(){
						jQuery('input:text,input:password')
						.focus(function(e){
							var jthis = jQuery(this);
							if(jthis.attr('title') && jthis.val()== jthis.attr('title')) jthis.val('');
						}).blur(function(e){
							var jthis = jQuery(this);
							if(jthis.attr('title') && !jthis.val()) jthis.val(jthis.attr('title'));	
						});
					});
				</script>

				<div class="input_submit2">
					<input name="submit" type="submit" value="submit" class="inputSubmit2" />
				</div>
		   <!--@end-->
		</div>
	</form>
</div>

<div class="feedback reply">
	<!--@if($guestbook_list)-->
		<ol class="feedbackOrder">
			<!--@foreach($guestbook_list as $key => $val)-->
				<!--@if($modify == $val->guestbook_item_srl)-->
					<li class="item replyForm">
						<form method="post" onsubmit="return insertGuestbookItem(this, insert_guestbookitem)" action="">
							<input name="mid" type="hidden" value="{$mid}" />
							<input type="hidden" name="guestbook_item_srl" value="{$val->guestbook_item_srl}" />
                            <fieldset>
								<textarea class="inputTextarea" name="content" rows="5" cols="50">{@ $guestbook_content = strip_tags($val->content)}{$guestbook_content}</textarea>
							</fieldset>
							<!--@if($is_logged)-->
								<span class="member_{$logged_info->member_srl}"><strong class="name">{$logged_info->nick_name}</strong></span> <span class="email">{$logged_info->email_address}</span> <span class="url">{$logged_info->homepage}</span>
								<div class="input_submit2">
									<input name="submit" type="submit" value="Modify" class="inputSubmit2" />
								</div>
							<!--@else-->
								<input name="nick_name" type="text" class="inputText name" value="Name" title="Name"/>
								<input name="password" type="password" class="inputText pw" value="Password" title="Password" />
								<script type="text/javascript">
									jQuery(function(){
										jQuery('input:text,input:password')
										.focus(function(e){
											var jthis = jQuery(this);
											if(jthis.attr('title') && jthis.val()== jthis.attr('title')) jthis.val('');
										}).blur(function(e){
											var jthis = jQuery(this);
											if(jthis.attr('title') && !jthis.val()) jthis.val(jthis.attr('title'));	
										});
									});
								</script>
								<div class="input_submit2">
									<input name="submit" type="submit" value="Modify" class="inputSubmit2" />
								</div>
							<!--@end-->
						</form>							
					</li>
				<!--@else-->
					{@ 
						$oMemberModel = &getModel('member');
						$memberImage = $oMemberModel->getProfileImage($val->member_srl);
					}
					<li class="item<!--@if($val->parent_srl>0)--> indent indent1<!--@end-->">
						<div class="item2">
							<div class="img">
								<!--@if($memberImage)-->
									<img border="0" src="{$memberImage->src}" width="69" height="68">
								<!--@else-->
									<img border="0" src="./img/default_member.gif" width="69" height="68">
								<!--@end-->
							</div>
							<div class="meta">
								<h4 class="author">
									<!--@if($val->homepage)-->
									<a href="{$val->homepage}" onclick="window.open(this.href);return false;" class="member_{$val->member_srl}">{$val->nick_name}</a>
									<!--@else-->
									<span class="member_{$val->member_srl}">{$val->nick_name}</span>
									<!--@end-->
								</h4>
								<span class="date">{zdate($val->regdate,'Y.m.d')} <span class="hhmm">{zdate($val->regdate,'H:i')}</span></span>
								<ul class="reAction" id="{$val->guestbook_item_srl}_re">
									<!--@if($val->parent_srl==0)-->
									<li><a href="{getUrl('modify','','reply',$val->guestbook_item_srl)}#gusetbook_{$val->guestbook_item_srl}">{$lang->cmd_reply}</a></li>
									<!--@end-->

									<!--@if($val->member_srl || $logged_info->is_admin == 'Y')-->
										<!--@if($logged_info->member_srl == $val->member_srl)-->
											<li><a href="{getUrl('reply','','modify',$val->guestbook_item_srl)}#gusetbook_{$val->guestbook_item_srl}">{$lang->cmd_modify}</a></li>
										<!--@end-->
										<!--@if($logged_info->is_admin == 'Y'|| $logged_info->member_srl == $val->member_srl)-->
											<li class="last"><a onclick="if(confirm('{$lang->confirm_delete}')) deleteGuestbookItem({$val->guestbook_item_srl});">{$lang->cmd_delete}</a></li>
										<!--@end-->
									<!--@end-->
								</ul>
								<script type="text/javascript">
									jQuery(function($){
										var ul_id = '#{$val->guestbook_item_srl}_re';
										$(ul_id).find('li').last().attr('class', 'last');
									});
								</script>
							</div>
							<div class="data textyleContent">
								{$val->content}
							</div>
						</div>
					</li>
				<!--@end-->
				<!--@if($reply == $val->guestbook_item_srl)-->
					<li class="item replyForm">
						<form method="post" onsubmit="return insertGuestbookItem(this, insert_guestbookitem)" action="">
							<input name="mid" type="hidden" value="{$mid}" />
							<input type="hidden" name="parent_srl" value="{$val->guestbook_item_srl}" />
							<fieldset>
								<textarea class="inputTextarea" name="content" rows="5" cols="50"></textarea>
							</fieldset>
							<!--@if($is_logged)-->
								<span class="member_{$logged_info->member_srl}"><strong class="name">{$logged_info->nick_name}</strong></span> <span class="email">{$logged_info->email_address}</span> <span class="url">{$logged_info->homepage}</span>
								<div class="input_submit">
									<input name="submit" type="submit" value="Reply" class="inputSubmit" />
								</div>
							<!--@else-->
								<input name="nick_name" type="text" class="inputText name" value="Name" title="Name"/>
								<input name="password" type="password" class="inputText pw" value="Password" title="Password" />
								<script type="text/javascript">
									jQuery(function(){
										jQuery('input:text,input:password')
										.focus(function(e){
											var jthis = jQuery(this);
											if(jthis.attr('title') && jthis.val()== jthis.attr('title')) jthis.val('');
											}).blur(function(e){
												var jthis = jQuery(this);
												if(jthis.attr('title') && !jthis.val()) jthis.val(jthis.attr('title'));	
										});
									});
								</script>
								<div class="input_submit2">
									<input name="submit" type="submit" value="Reply" class="inputSubmit2" />
								</div>
							<!--@end-->
						</form>
					</li>
				<!--@end-->
			<!--@endforeach-->
		</ol>
	<!--@end-->
</div>
<!--@if($page_navigation)-->
<div class="pagination">
	<a href="{getUrl('page','','guestbook_item_srl','','division',$division,'last_division',$last_division)}" class="prevEnd">{$lang->first_page}</a> 
	<a href="#" class="btn_prevEnd"><span>prev</span></a> 
	<!--@while($page_no = $page_navigation->getNextPage())-->
		<!--@if($page == $page_no)-->
			<strong>{$page_no}</strong> 
		<!--@else-->
			<a href="{getUrl('page',$page_no,'question_srl','','division',$division,'last_division',$last_division)}">{$page_no}</a>
		<!--@end-->
	<!--@end-->
	<a href="#" class="btn_nextEnd"><span>next</span></a>
	<a href="{getUrl('page',$page_navigation->last_page,'question_srl','','division',$division,'last_division',$last_division)}" class="nextEnd">{$lang->last_page}</a>
</div>
<!--@end-->
<!--#include("_footer.html")-->

